import StartNode from "@/pages/Graph/Assistant/components/node/start";
import EndNode from "@/pages/Graph/Assistant/components/node/end";
import JudgeNode from "@/pages/Graph/Assistant/components/node/judge";
import LLMNode from "@/pages/Graph/Assistant/components/node/llm";
import PromptNode from "@/pages/Graph/Assistant/components/node/prompt";
import HttpNode from "@/pages/Graph/Assistant/components/node/tool/http";
import QdrantNode from "@/pages/Graph/Assistant/components/node/tool/qdrant";
export type NodeType = "start" | "end" | "judge" | "llm" | "prompt" | "http" | "qdrant"
export function getNodeUI<T extends NodeSetting.Setting<any>>(type: NodeType): {
  NodeUi: React.ComponentType<T>,
  SpecificData?: Record<string, any>
} {
  switch (type) {
    case "start":
      return {
        NodeUi: StartNode as React.ComponentType<T>,
        SpecificData: {
          functionComponentId: "1234467721559805952",
          secondTransFromDB: false,
          secondTrans: false
        }
      }
    case "end":
      return {
        NodeUi: EndNode as React.ComponentType<T>,
        SpecificData: {
          functionComponentId: "1234467722428026880",
          secondTransFromDB: false,
          secondTrans: false
        }
      }
    case "judge":
      return {
        NodeUi: JudgeNode as React.ComponentType<T>,
        SpecificData: {
          functionComponentId: "1234467722209923072",
          secondTransFromDB: false,
          secondTrans: false
        }
      }
    case "llm":
      return {
        NodeUi: LLMNode as React.ComponentType<T>,
        SpecificData: {
          functionComponentId: "1234555610452856832",
          secondTransFromDB: false,
          secondTrans: false
        }
      }
    case "prompt":
      return {
        NodeUi: PromptNode as React.ComponentType<T>,
        SpecificData: {
          functionComponentId: "1234467721983430656",
          secondTransFromDB: false,
          secondTrans: false
        }
      }
    case "http":
      return {
        NodeUi: HttpNode as React.ComponentType<T>,
        SpecificData: {
          functionComponentId: "1234467721773715456",
          secondTransFromDB: false,
          secondTrans: false
        }
      }
    case "qdrant":
      return {
        NodeUi: QdrantNode as React.ComponentType<T>,
        SpecificData: {
          functionComponentId: "1234555610868092928",
          secondTransFromDB: false,
          secondTrans: false
        }
      }
    default:
      return {
        NodeUi: () => (<div></div>)
      }
  }
}
